package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface StrategyRepository extends MongoRepository<Strategy,String> {

    List<Strategy> findByDestName(String destName);

    /**
     * 根据catalogId寻找相关的攻略
     * @param catalogId
     * @return
     */
    List<Strategy> findByCatalogId(String catalogId);

    /**
     * 根据destId查询,并分页
     * @param destId
     * @param pageable
     * @return
     */
    List<Strategy> findByDestId(String destId, Pageable pageable);
}
